home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7385 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: portland.caps.maine.edu!dseama41
  2. Organization: University of Maine System
  3. Date: Thu, 22 Feb 1996 17:11:41 EST
  4. From: Starduster <DSEAMA41@portland.caps.maine.edu>
  5. Message-ID: <96053.171141DSEAMA41@portland.caps.maine.edu>
  6. Newsgroups: comp.lang.c++
  7. Subject: Re: pow(-1,1.1) = DOMAIN error
  8. References: <Christian.Straka.15.0010E3C9@uni-konstanz.de>
  9.  
  10. In article <Christian.Straka.15.0010E3C9@uni-konstanz.de>,
  11. Christian.Straka@uni-konstanz.de (Christian Straka) says:
  12. >The pow() and powl() function in <math.h> doesn't work properly. The following
  13. >example causes a DOMAIN error exception (see defs in math.h):
  14. >
  15. >             pow(-1,1.1);
  16. >
  17. >Has anyone an idea to fix this problem?
  18.     Goodness! I just tried the same thing and got the same error message! Then
  19. I tried it in MS-DOS QBasic and got "Illegal Function Call"! Same bug exists
  20. there!! But the clincher was when I tried it on my pocket calculators (TI-30X
  21. Solar. Sci and Casio fx-115n) and they gave me ERROR and -E- too, respectively!
  22. )
  23. I have trashed the Casio as it is obviously in error (out of warranty) and the
  24. TI I have sent back to Texas Instruments for the repair it obviously needs. I
  25. am so glad to now Turbo C++ and QBasic both have this bug as well...forwarned
  26. is forearmed, ya know!!
  27.    (Hmm...."DOMAIN"...I wonder if that has any actual meaning? Maybe in the
  28. context of mathmatics? Naw! THat was just a random word the program threw up
  29. before it crashed...it can't mean I was in error at any point! Although when
  30. I did try to divide by zero and take the square root of a negative number in
  31. an earlier program, equally funky errors occured.)
  32.  
  33. :)
  34.